package com.learn.thread;

class MyThread1 implements Runnable{

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            if(i % 2 == 0){
                System.out.println(i);
            }
        }
    }
}

public class TreadCreateByRunnable {
    public static void main(String[] args) {
        MyThread1 myThread1 = new MyThread1();
        Thread t = new Thread(myThread1);
        t.start();
    }
}
